/*
 * This file is part of b.AMP.
 * 
 * b.AMP is free software: you can redistribute it and/or modify it under 
 * the terms of the GNU Lesser General Public License as published by the 
 * Free Software Foundation, either version 3 of the License, or (at your 
 * option) any later version.
 * 
 * b.AMP is distributed in the hope that it will be useful, but WITHOUT ANY
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU lesser General Public 
 * License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public License
 * along with b.AMP.  If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef __BAMP_NONCOPYABLE__
#define __BAMP_NONCOPYABLE__


namespace bamp
{

    /**
     * The Noncopyable class is an explicit way to disallow copies.
     * Objects from derived classes cannot be copied because the copy
     * constructor and copy assignment operator are private and are
     * not defined.
     */
    class Noncopyable
    {
    protected:

        // The Noncopyable class alone is useless
        Noncopyable()  {}
        ~Noncopyable() {}

    private:

        // Prevent derived objects from being copied
        Noncopyable(const Noncopyable&);
        const Noncopyable& operator=(const Noncopyable&);
    };

} // namespace bamp

#endif // __BAMP_NONCOPYABLE__
